package com.iss.demo.service;

import com.iss.demo.dao.ContactDao;
import com.iss.demo.entity.Contact;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ContactService {

    @Autowired
    private ContactDao dao;


    public List<Contact> selectAll(){
        List<Contact> list = new ArrayList<>();
        list = dao.selectAll();
        return list;
    }
    public Integer insertContact(Contact contact){
        return dao.insertContact(contact);
    }
}
